home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / fweb / fweb-1.40 / manual / Makefile < prev    next >
Makefile  |  1993-10-29  |  7KB  |  224 lines

  1. # --- FWEB MAKE FILE (v. 1.30) FOR USER MANUAL ---
  2.  
  3. # BEFORE USING THIS MAKEFILE:  
  4. #  Read and execute the instructions at the beginning of the main Makefile.
  5.  
  6. # PLEASE REPORT ANY DIFFICULTIES WITH USING THIS MAKE FILE OR WITH ANY
  7. # OTHER ASPECT OF COMPILING OR RUNNING FWEB:  krommes@princeton.edu.
  8.  
  9. # You should PREFACE ALL MAJOR OPERATIONS with
  10.  
  11. #    make -n ...
  12.  
  13. # This tells you what will happen without actually performing the operations.
  14.  
  15.  
  16. # --- PRINCIPAL ENTRY POINTS ---
  17.  
  18. # The principal entry points to this make file can be determined by saying
  19. # ``make help''.  (See the help: target below.)
  20.  
  21.  
  22. # --- INCLUDING FILES into the Makefile ---
  23.  
  24. # The file defaults.mk customizes the operation of Makefile for your
  25. # compiler environment.
  26. # NOTE: Not all makes include files in identical ways; you may need to
  27. # modify the next line:
  28.  
  29. include ../web/defaults.mk # Unix
  30. # ! include "../web/defaults.mk" # Borland/Microsoft
  31.  
  32. # --------------------- DON'T CHANGE ANYTHING BELOW HERE --------------------
  33.  
  34. # --- Name of the manual  and reference guide---
  35. MAN = fwebman
  36. GUIDE = guide
  37.  
  38. # To run this make file, we must always be in the manual subdirectory.
  39. MANUAL = .
  40.  
  41. # USER ENTRY POINT:  ``make all''
  42. all: manual guide
  43.  
  44. # --- Dependent files for the manual ---
  45. COMMON_INPUTS = $(MANUAL)/fmanmacs.tex $(MANUAL)/fmanrefs.tex \
  46.     $(MANUAL)/indexing.tex\
  47.     $(MANUAL)/dots.tex
  48.  
  49. MAN_INPUTS = $(COMMON_INPUTS) $(MANUAL)/guide0.tex
  50.  
  51. GUIDE_INPUTS = $(COMMON_INPUTS) $(STL_INPUTS)
  52.  
  53. STL_INPUTS = $(MANUAL)/equiv.tex\
  54.     $(MANUAL)/index.stl\
  55.     $(MANUAL)/modules.stl\
  56.     $(MANUAL)/contents.stl\
  57.     $(MANUAL)/subs.stl\
  58.     $(MANUAL)/formats.stl\
  59.     $(MANUAL)/wmisc.stl\
  60.     $(MANUAL)/t.stl\
  61.     $(MANUAL)/wtmisc.stl\
  62.     $(MANUAL)/auto.stl\
  63.     $(MANUAL)/colors.stl\
  64.     $(MANUAL)/ccodes.stl
  65.  
  66. DEMOS = $(MANUAL)/demo0.tex\
  67.     $(MANUAL)/demo1.tex\
  68.     $(MANUAL)/demo2.tex\
  69.     $(MANUAL)/demo3.tex\
  70.     $(MANUAL)/demo4.tex\
  71.     $(MANUAL)/f0to_web.tex\
  72.     $(MANUAL)/f_to_web.tex $(MANUAL)/f_to_web.f\
  73.     $(MANUAL)/f90_cpp.tex
  74.  
  75. demos: $(DEMOS) $(MANUAL)/demos.sty
  76.  
  77. $(MANUAL)/fwebmac.sty: $(MANUAL)/fwebmac.web
  78.     ftangle $(MANUAL)/fwebmac -# -=$(@)
  79.  
  80. $(MANUAL)/fwebmacL.sty: $(MANUAL)/fwebmacL.web
  81.     ftangle $(MANUAL)/fwebmacL -# -=$(@)
  82.  
  83. $(MANUAL)/demo0.tex: $(MANUAL)/demo0.web $(MANUAL)/fwebmac.sty
  84.     fweave $(MANUAL)/demo0 -zdemos.sty -=$(@)
  85.  
  86. $(MANUAL)/demo1.tex: $(MANUAL)/demo1.web $(MANUAL)/fwebmac.sty
  87.     fweave $(MANUAL)/demo1 -zdemos.sty -=$(@)
  88.  
  89. $(MANUAL)/demo2.tex: $(MANUAL)/demo2.web $(MANUAL)/fwebmac.sty
  90.     fweave $(MANUAL)/demo2 -zdemos.sty -=$(@)
  91.  
  92. $(MANUAL)/demo3.tex: $(MANUAL)/demo3.web $(MANUAL)/fwebmac.sty
  93.     fweave $(MANUAL)/demo3 -zdemos.sty -=$(@)
  94.  
  95. $(MANUAL)/demo4.tex: $(MANUAL)/demo4.web $(MANUAL)/fwebmac.sty
  96.     fweave $(MANUAL)/demo4 -zdemos.sty -=$(@)
  97.  
  98. $(MANUAL)/f0to_web.tex: $(MANUAL)/f0to_web.web $(MANUAL)/fwebmac.sty
  99.     fweave $(MANUAL)/f0to_web -zdemos.sty -=$(@)
  100.  
  101. $(MANUAL)/f_to_web.tex: $(MANUAL)/f_to_web.web $(MANUAL)/fwebmac.sty
  102.     fweave $(MANUAL)/f_to_web -zdemos.sty -=$(@)
  103.  
  104. $(MANUAL)/f_to_web.f: $(MANUAL)/f_to_web.web
  105.     ftangle $(MANUAL)/f_to_web -zdemos.sty -=$(@)
  106.  
  107. $(MANUAL)/f90_cpp.tex: $(MANUAL)/f90_cpp.web $(MANUAL)/fwebmac.sty
  108.     fweave $(MANUAL)/f90_cpp -zdemos.sty -=$(@)
  109.  
  110. # USER ENTRY POINT:  ``make guide''
  111. guide: $(GUIDE).body $(GUIDE).index
  112.  
  113. $(GUIDE).body: $(MANUAL)/$(GUIDE).tex $(MANUAL)/$(GUIDE)0.tex\
  114.         $(COMMON_INPUTS) $(GUIDE_INPUTS)
  115.     tex $(MANUAL)/$(GUIDE) 
  116.     $(MV) $(MANUAL)/$(GUIDE).dvi $(MANUAL)/$(GUIDE)1.dvi
  117.     $(PRINT_DVI) $(MANUAL)/$(GUIDE)1.dvi
  118.  
  119. $(GUIDE).index: $(GUIDE).body $(GUIDE).ind $(MANUAL)/$(GUIDE).ind
  120.     latex $(MANUAL)/$(GUIDE).ind
  121.     $(PRINT_DVI) $(MANUAL)/$(GUIDE).dvi
  122.  
  123. $(GUIDE).ind: $(GUIDE).body 
  124.     makeindex -s mx.sty -p any $(MANUAL)/$(GUIDE).idx
  125.  
  126. # USER ENTRY POINT:  ``make manual''
  127. manual $(MAN): tch_man $(MAN)0
  128.  
  129. tch_man:
  130.     $(TOUCH)  $(MANUAL)/*.sty $(MANUAL)/*.tex $(MANUAL)/*.f
  131.  
  132. manual0 $(MAN)0: $(MAN).body $(MAN).index
  133.  
  134. # After tex is run on the manual body, the dvi file is moved to
  135. # fwebman1.dvi, so subsequent processing of the index doesn't overwrite that.
  136. manual.body $(MAN).body: $(MANUAL)/$(MAN).tex\
  137.         $(MAN_INPUTS)\
  138.         $(MANUAL)/fwebmac.sty $(MANUAL)/fwebmac.tex\
  139.         $(MANUAL)/fwebmacL.sty $(MANUAL)/fwebmacL.tex\
  140.         $(DEMOS) $(MANUAL)/f0to_web.src
  141.     tex $(MANUAL)/$(MAN) 
  142.     $(MV) $(MANUAL)/$(MAN).dvi $(MANUAL)/$(MAN)1.dvi
  143.     $(PRINT_DVI) $(MANUAL)/$(MAN)1.dvi
  144.  
  145. manual.index $(MAN).index: $(MAN).body $(MAN).ind $(MANUAL)/$(MAN).ind
  146.     latex $(MANUAL)/$(MAN).ind
  147.     $(PRINT_DVI) $(MANUAL)/$(MAN).dvi
  148.  
  149. $(MAN).ind: $(MAN).body 
  150.     makeindex -s mx.sty -p any $(MANUAL)/$(MAN).idx
  151.     
  152.  
  153.  
  154. # --- INSTALLATION GUIDE ---
  155.  
  156. # Name of the installation guide.
  157. INSTALL_GUIDE = INSTALL_FWEB
  158.  
  159. install_guide $(INSTALL_GUIDE): $(INSTALL_GUIDE).body $(INSTALL_GUIDE).index
  160.  
  161. install_guide.body $(INSTALL_GUIDE).body: $(MANUAL)/$(INSTALL_GUIDE).tex\
  162.         $(MANUAL)/fmanmacs.tex $(MANUAL)/indexing.tex
  163.     tex $(MANUAL)/$(INSTALL_GUIDE)
  164.     $(MV) $(INSTALL_GUIDE).dvi $(INSTALL_GUIDE)1.dvi
  165.     $(PRINT_DVI) $(MANUAL)/$(INSTALL_GUIDE)1.dvi
  166.  
  167. install_guide.index $(INSTALL_GUIDE).index: $(INSTALL_GUIDE).body \
  168.         $(INSTALL_GUIDE).ind $(MANUAL)/$(INSTALL_GUIDE).ind
  169.     latex $(MANUAL)/$(INSTALL_GUIDE).ind
  170.     $(PRINT_DVI) $(MANUAL)/$(INSTALL_GUIDE).dvi
  171.  
  172. $(INSTALL_GUIDE).ind: $(INSTALL_GUIDE).body 
  173.     makeindex -s mx.sty -p any $(MANUAL)/$(INSTALL_GUIDE).idx
  174.  
  175.  
  176.  
  177. # --- INSTALLATION of the manual ---
  178.  
  179. install: $(MANUAL)/$(MAN)1.dvi $(MANUAL)/$(GUIDE)1.dvi \
  180.         $(MANUAL)/$(MAN).dvi $(MANUAL)/$(GUIDE).dvi
  181.     @echo ""
  182.     @echo "If any changes need to be made to the default directories,"
  183.     @echo "please edit ../web/defaults.mk.in, then rerun ../configure."
  184.     @echo ""
  185.     -test ! -d $(manualdir) && mkdir $(manualdir)
  186.     $(INSTALL_DATA) $(MANUAL)/$(MAN).tex $(MANUAL)/$(GUIDE).tex \
  187.         $(manualdir)/
  188.     $(INSTALL_DATA) $(MAN_INPUTS) $(STL_INPUTS) \
  189.         $(manualdir)/
  190.     $(INSTALL_DATA) $(MANUAL)/$(MAN).ind $(MANUAL)/$(GUIDE).ind \
  191.         $(manualdir)
  192.  
  193. uninstall: 
  194.     $(RM) -r $(manualdir)
  195.  
  196.  
  197. # --- CLEANUP ---
  198.  
  199. clean:
  200.     $(RM) -f *.idx *.ind *.aux *.ilg *.log *.dvi
  201.  
  202. mostlyclean: clean
  203.  
  204. distclean: clean
  205.  
  206. realclean: distclean
  207.  
  208. # --- HELP ---
  209.  
  210. help:
  211.     @echo "Important targets for this Makefile:"
  212.     @echo ""
  213.     @echo " all           --- The user manual as well as reference guide (does not print)."
  214.     @echo " clean         --- Removes *.idx, *.ind, *.aux, *.ilg, *.log, and *.dvi."
  215.     @echo " guide         --- Short REFERENCE GUIDE (several appendices from"
  216.     @echo "                   complete user manual)."
  217.     @echo " install       --- Permanently install the manual."
  218.     @echo " install_guide --- Detailed INSTALLATION GUIDE and explanation of FWEB files."
  219.     @echo " manual        --- The complete (long!) USER MANUAL."
  220.     @echo " manual.body   --- Manual text only."
  221.     @echo " manual.index  --- Manual index only."
  222.     @echo " *.dvi         --- DOCUMENTS an FWEB source; runs fweave and TeX."
  223.  
  224.